﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Pack.ascx.cs" Inherits="Admin_Components_Customer_Pack" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<telerik:RadScriptManager ID="ScriptManager2" runat="server" EnableTheming="True">
</telerik:RadScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <telerik:RadTabStrip ID="TabStrip1" runat="server" EnableDragToReorder="true" Skin="Vista" MultiPageID="RadMultiPag1" SelectedIndex="1">
            <Tabs>
                 <telerik:RadTab Text="THÔNG TIN CHUNG" Selected="True">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="RadMultiPag1" runat="server" SelectedIndex="0">
             <telerik:RadPageView ID="RadPageView1" runat="server" Height="100px" Style="overflow: hidden">
                 <fieldset class="form" id="fsGeneral">
                  <br />
                     <div class="form-horizontal wrapper-center clearfix">
                         <div class="row col-md-12">
                              <!--Block bên trái -->
                             <div class="form-group col-md-6">
                                 <div class="form-group">
                                    <label class="col-md-3 control-label">Cửa hàng <span style="color:red;">(*)</span></label>
                                    <div class="col-md-8">
                                        <telerik:RadComboBox ID="cboShop" runat="server" CssClass="col-imp-8" />
                                        <asp:RequiredFieldValidator  ID="RequiredFieldValidator1" runat="server" ControlToValidate="cboShop" ValidationGroup="g1"
                                        ErrorMessage="" InitialValue="---Chọn---"></asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-md-3 control-label">Người tạo</label>
                                        <div class="col-md-8">
                                            <telerik:RadTextBox ID="txtCreateName" CssClass="col-imp-3 inputForm"  runat="server" enabled="false"/>
                                        </div>
                                    </div>
                             </div>
                            <!--End Block bên trái -->
                            <!--Block bên phải -->
                             <div class="form-group col-md-6">
                                  <!--Dòng -->
                                <div class="form-group">
                                    <label class="col-md-3 control-label">Ngày tạo</label>
                                    <div class="col-md-9">
                                        <telerik:RadTextBox ID="txtCreateDate" CssClass="col-imp-4 inputForm"  runat="server" enabled="false"/>
                                    </div>
                                </div>
                              
                             </div>
                            <!--End Block bên phải -->
                         </div>
                     </div>
                </fieldset>
            </telerik:RadPageView>
        </telerik:RadMultiPage>
        <!--Danh sach loai vo bao -->
        <div class="row">
             <div class="form-group col-md-6">
             <telerik:radgrid id="gvPack" runat="server" cellspacing="0" cssclass=" table table-bordered" style="margin-left:-15px;height:140px;"
                    AllowCustomPaging="true"  gridlines="None" autogeneratecolumns="False" headerstyle-horizontalalign="Center" 
                    allowmultirowselection="True" headerstyle-borderstyle="None">
                    <MasterTableView ShowHeader="true" NoMasterRecordsText="Không có dữ liệu." ShowGroupFooter="true" EditMode="InPlace" >
                        <Columns>
                            <telerik:GridTemplateColumn HeaderText="STT" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <%# Container.ItemIndex + 1 %></ItemTemplate>
                                <HeaderStyle Width="50px" />
                                <ItemStyle HorizontalAlign="Center" />
                            </telerik:GridTemplateColumn>
                             <telerik:GridBoundColumn  HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"
                                    UniqueName="PackType" DataField="PackType" Display="false">
                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn  HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderText="Loại vỏ bao"
                                    UniqueName="PackTypeDesc" DataField="PackTypeDesc">
                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn HeaderText="Số lượng">
                            <ItemTemplate>
                                <telerik:RadNumericTextBox ID="txtQuantity" runat="server" 
                                    NumberFormat-DecimalDigits="0" MinValue="0" CssClass="col-imp-7 inputForm" />
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Right" Width="140px" />
                            <ItemStyle HorizontalAlign="Right" Width="140px" />
                        </telerik:GridTemplateColumn>
                        </Columns>
                    </MasterTableView>
                 </telerik:radgrid>
                 </div>
                <div class="form-group col-md-6" style="margin-top:105px">
                    <asp:Button ID="btnSubmit" CssClass="btn btn-sm btn-primary" runat="server" Text="Đồng ý" OnClick="btnSubmit_Click" ValidationGroup="g1" OnClientClick="fnOnUpdateValidators('g1')"/>
                    <asp:Button ID="btnSave" CssClass="btn btn-sm btn-primary" runat="server" Text="Lưu" OnClick="btnSave_Click" ValidationGroup="g1" OnClientClick="fnOnUpdateValidators('g1')"/>
                    <asp:Button ID="btnReset" runat="server" CssClass="btn btn-sm btn-primary" Text="Tạo mới" OnClick="btnReset_Click"/>
                </div>
        </div>

        <!--Danh sach qua tang -->
        <div class="row">
            <telerik:radgrid id="gvPrmotion" runat="server" cellspacing="0" cssclass=" table table-bordered" style="margin-left:0px; width:70%;"
                    AllowCustomPaging="true"  gridlines="None" autogeneratecolumns="False" headerstyle-horizontalalign="Center" 
                    allowmultirowselection="True" headerstyle-borderstyle="None">
                    <MasterTableView ShowHeader="true" NoMasterRecordsText="Không có dữ liệu." ShowGroupFooter="true" EditMode="InPlace" >
                        <Columns>
                            <telerik:GridTemplateColumn HeaderText="STT" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <%# Container.ItemIndex + 1 %></ItemTemplate>
                                <HeaderStyle Width="50px" />
                                <ItemStyle HorizontalAlign="Center" />
                            </telerik:GridTemplateColumn>
                             <telerik:GridBoundColumn  HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderText="Tên quà tặng"
                                    UniqueName="ProductName" DataField="ProductName">
                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" Font-Bold="true"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn  HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderText="Loại quà tặng"
                                    UniqueName="PackTypeDesc" DataField="PackTypeDesc">
                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn  ReadOnly="true" HeaderText="Số lượng KM chưa chọn"  UniqueName="PromotionQuantity" DataField="PromotionQuantity">
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn HeaderText="Số lượng KM đã chọn">
                            <ItemTemplate>
                                <telerik:RadNumericTextBox ID="PromotionQuantitySelect" runat="server" AutoPostBack="true" OnTextChanged ="PromotionQuantitySelect_TextChanged"
                                    NumberFormat-DecimalDigits="0" MinValue="0" CssClass="col-imp-7 inputForm" Text ='<%# Eval("PromotionQuantitySelect") %>'/>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Right" Width="140px" />
                            <ItemStyle HorizontalAlign="Right" Width="140px" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn  ReadOnly="true" UniqueName="ProductID" DataField="ProductID" Display="false" ></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn  ReadOnly="true" UniqueName="PromotionID" DataField="PromotionID" Display="false" ></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn  ReadOnly="true" UniqueName="PromotionDetailID" DataField="PromotionDetailID" Display="false" ></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn  ReadOnly="true" UniqueName="PackType" DataField="PackType" Display="false"> </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn  ReadOnly="true" UniqueName="PackQuantity" DataField="PackQuantity" Display="false"> </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                 </telerik:radgrid>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>
<div class="progressbar">
    <asp:UpdateProgress ID="up" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
        <ProgressTemplate>
            <div class="bg">
                <div class="progress progress-striped active">
                    <div class="progress-bar" role="progressbar" aria-valuenow="45" aria-valuemin="0"
                        aria-valuemax="100" style="width: 100%">
                        <span class="sr-only">100% Complete</span>
                    </div>
                </div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
</div>
